package com.genghis.rapidcrm;

import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource(value = "classpath:/config/rapidcrm-config-performance.properties")
public class PerformancePrefs {

    /**
     * Enable log4app debugging only if requried
     */
    public Boolean LOG4APP_DEBUG = false;

    /**
     * Should the caller information be captured in SQL Logging?
     * It adds little overhead for performance but will be useful to debug
     */
    public Boolean SQL_LOG_INCLUDE_CALLER = false;

    /**
     * If database default charset is UTF-8, set this to true
     * This avoids executing the SET NAMES SQL for each query!
     */
    public Boolean DB_DEFAULT_CHARSET_UTF8 = true;

    /**
     * Compute record change indication for each record shown on listview
     */
    public Boolean LISTVIEW_RECORD_CHANGE_INDICATOR = false;

    /**
     * Turn-off default sorting in ListView, could eat up time as data grows
     */
    public Boolean LISTVIEW_DEFAULT_SORTING = false;

    /**
     * Compute list view record count while loading listview everytime.
     * Recommended value false
     */
    public Boolean LISTVIEW_COMPUTE_PAGE_COUNT = false;

    /**
     * Control DetailView Record Navigation
     */
    public Boolean DETAILVIEW_RECORD_NAVIGATION = true;

    /**
     * To control the Email Notifications being sent to the Owner
     * By default it is set to true, if it is set to false, then notifications will not be sent
     */
    public Boolean NOTIFY_OWNER_EMAILS = true;

    /**
     * reduce number of ajax requests on home page,
     * reduce this value if home page widget dont show value.
     */
    public Integer HOME_PAGE_WIDGET_GROUP_SIZE = 12;

    /**
     * take backup legacy style, whenever an admin user logs out.
     */
    public Boolean LOGOUT_BACKUP = true;
}
